package framework.controller;

public interface IServerController {

	/**
	 * Try to login to a specific user with a given username
	 * @param username The name that represends the user
	 * @param server The server's IP + port (xxx.xxx.xxx.xxx:xxxx)
	 * @return
	 */
	boolean login(String username, String server);
	
	/**
	 * Disconnects the client from the server
	 */
	void logout();
	
	/**
	 * Request a list with available game types
	 * @return A list with names of the available game types
	 */
	String[] getGameList();
	
	/**
	 * Request a list of currently connected players
	 * @return A list with names of the currently connected players
	 */
	String[] getPlayerList();
	
	/**
	 * Subscribe for a given game type
	 * @param gametype The game type the player wants to subscribe for
	 */
	void subscribe(String gametype);
	
	/**
	 * Make a move
	 * @param number The number of the field
	 */
	void move(int number);
	
	/**
	 * Throw in the towel, give up, accept defeat, recognize that you are a failure
	 */
	void forfeit();
	
	/**
	 * Challenge a player to a game
	 * @param player The player you want to challenge
	 * @param gametype The sort of game you want to play
	 */
	void challenge(String player, String gametype);
	
	/**
	 * Accept a challenge
	 * @param challengeID The ID of the challenge
	 */
	void acceptChallenge(int challengeID);
}
